package edu.qd.learn.newchapter.chapter04.learncollection;

import java.util.*;
import java.util.stream.Stream;

/**
 * 底层
 *
 * @author 布衣
 */
public class Hashmap {

    public static void main(String[] args) {

        //排序 collection map [升降序问题]

        Map<String, String> sortedMap = new TreeMap<>((k1,k2)->-(k1.compareTo(k2)));
        sortedMap.put("t","sss");
        sortedMap.put("z","sss");
        sortedMap.put("h","sss");
        sortedMap.put("x","sss");
        sortedMap.put("b","sss");
        sortedMap.put("a","sss");
        System.out.println(sortedMap+"==有序");
        Set<String> set = new TreeSet<>((k1,k2)->-(k1.compareTo(k2)));

        List<String> list = new ArrayList<>();
        list.sort((k1,k2)->-(k1.compareTo(k2)));

        //0.75
        Map<String, String> map = new TreeMap<>();
//        [ , [97,"a","b",null] ,......,[165374702,"ABCDEa123abc","x",[165374702,ABCDFB123abc,y,null]],]
        // 97
        map.put("a", "b");  // 1
        //165374702
        map.put("ABCDEa123abc", "x");
        //165374702
        map.put("ABCDFB123abc", "y");

        System.out.println(165374702 & 15); // 14

    }

}
